package ludo;

import java.io.Serializable;

public class SimpleView implements GameView, Serializable {

	Engine game;
	static final long serialVersionUID = 6741476;
	
	public SimpleView(Engine game){
		this.game=game;
	}
	
	public void update() {
		int player=0;
		for(Player p: game.players){
			System.out.println("\n---- PLAYER "+player+" ----");
			for(int i=0;i<p.boardSize;i++){
				if(p.board[i]>0){
					System.out.println("Square "+game.index(i, player)+": "+p.board[i]+" piece(s)");
				}
			}
			player++;
		}
		System.out.println("-------------");
		System.out.println("Player turn: "+game.playerInTurn);
		System.out.println("Dice: "+game.dice);
	}

}
